Skip to content

Use eventsource package, to permit custom headers for SSE #134

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jan 23, 2025

Conversation

jspahrsummers
Copy link
Member

@jspahrsummers jspahrsummers commented Jan 22, 2025

This is the first step in supporting the upcoming addition of authentication to the spec. To follow the spec here requires the ability to attach an Authorization header to the opening SSE request; this is now supported through the use of the eventsource package.

Using eventsource also means that Node.js applications can use the built-in SSE client (previously, this depended on the browser-only EventSource class).

This PR also includes more general tests for the SSE client functionality, which were absent.

@jspahrsummers jspahrsummers merged commit edfdea5 into main Jan 23, 2025
4 checks passed
@jspahrsummers jspahrsummers deleted the justin/sse-auth branch January 23, 2025 13:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant